import ReactDOM from 'react-dom/client'
import { RouterProvider } from 'react-router-dom'
import router from './router'
import zh_CN from 'antd/es/locale/zh_CN';
import en_GB from 'antd/es/locale/en_GB';
import th_TH from 'antd/es/locale/th_TH';
import { ConfigProvider } from 'antd';
import './index.css'


const language = localStorage.getItem('language') || 'zh'

ReactDOM.createRoot(document.getElementById('root')).render(
  <ConfigProvider locale={language === 'zh' ? zh_CN : language === 'th_TH' ? th_TH : en_GB}>
    <RouterProvider router={router} />
  </ConfigProvider>

)